Optimal. Leaf size=288 \[ \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {\tan (e+f x)+1}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{f}-\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \tan ^{-1}\left (\frac {2 \sqrt {\tan (e+f x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{f}-\frac {\log \left (\tan (e+f x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\tan (e+f x)+1}+\sqrt {2}+1\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )} f}+\frac {\log \left (\tan (e+f x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\tan (e+f x)+1}+\sqrt {2}+1\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )} f}-\frac {\tanh ^{-1}\left (\sqrt {\tan (e+f x)+1}\right )}{f}-\frac {\sqrt {\tan (e+f x)+1} \cot (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.35, antiderivative size = 288, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 13, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.619, Rules used = {3568, 3653, 3485, 700, 1127, 1161, 618, 204, 1164, 628, 3634, 63, 207} \[ \frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {\tan (e+f x)+1}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{f}-\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \tan ^{-1}\left (\frac {2 \sqrt {\tan (e+f x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{f}-\frac {\log \left (\tan (e+f x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\tan (e+f x)+1}+\sqrt {2}+1\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )} f}+\frac {\log \left (\tan (e+f x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\tan (e+f x)+1}+\sqrt {2}+1\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )} f}-\frac {\tanh ^{-1}\left (\sqrt {\tan (e+f x)+1}\right )}{f}-\frac {\sqrt {\tan (e+f x)+1} \cot (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 204
Rule 207
Rule 618
Rule 628
Rule 700
Rule 1127
Rule 1161
Rule 1164
Rule 3485
Rule 3568
Rule 3634
Rule 3653
Rubi steps
\begin {align*} \int \cot ^2(e+f x) \sqrt {1+\tan (e+f x)} \, dx &=-\frac {\cot (e+f x) \sqrt {1+\tan (e+f x)}}{f}-\int \frac {\cot (e+f x) \left (-\frac {1}{2}+\tan (e+f x)+\frac {1}{2} \tan ^2(e+f x)\right )}{\sqrt {1+\tan (e+f x)}} \, dx\\ &=-\frac {\cot (e+f x) \sqrt {1+\tan (e+f x)}}{f}+\frac {1}{2} \int \frac {\cot (e+f x) \left (1+\tan ^2(e+f x)\right )}{\sqrt {1+\tan (e+f x)}} \, dx-\int \sqrt {1+\tan (e+f x)} \, dx\\ &=-\frac {\cot (e+f x) \sqrt {1+\tan (e+f x)}}{f}+\frac {\operatorname {Subst}\left (\int \frac {1}{x \sqrt {1+x}} \, dx,x,\tan (e+f x)\right )}{2 f}-\frac {\operatorname {Subst}\left (\int \frac {\sqrt {1+x}}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {\cot (e+f x) \sqrt {1+\tan (e+f x)}}{f}+\frac {\operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+\tan (e+f x)}\right )}{f}-\frac {2 \operatorname {Subst}\left (\int \frac {x^2}{2-2 x^2+x^4} \, dx,x,\sqrt {1+\tan (e+f x)}\right )}{f}\\ &=-\frac {\tanh ^{-1}\left (\sqrt {1+\tan (e+f x)}\right )}{f}-\frac {\cot (e+f x) \sqrt {1+\tan (e+f x)}}{f}+\frac {\operatorname {Subst}\left (\int \frac {\sqrt {2}-x^2}{2-2 x^2+x^4} \, dx,x,\sqrt {1+\tan (e+f x)}\right )}{f}-\frac {\operatorname {Subst}\left (\int \frac {\sqrt {2}+x^2}{2-2 x^2+x^4} \, dx,x,\sqrt {1+\tan (e+f x)}\right )}{f}\\ &=-\frac {\tanh ^{-1}\left (\sqrt {1+\tan (e+f x)}\right )}{f}-\frac {\cot (e+f x) \sqrt {1+\tan (e+f x)}}{f}-\frac {\operatorname {Subst}\left (\int \frac {1}{\sqrt {2}-\sqrt {2 \left (1+\sqrt {2}\right )} x+x^2} \, dx,x,\sqrt {1+\tan (e+f x)}\right )}{2 f}-\frac {\operatorname {Subst}\left (\int \frac {1}{\sqrt {2}+\sqrt {2 \left (1+\sqrt {2}\right )} x+x^2} \, dx,x,\sqrt {1+\tan (e+f x)}\right )}{2 f}-\frac {\operatorname {Subst}\left (\int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 x}{-\sqrt {2}-\sqrt {2 \left (1+\sqrt {2}\right )} x-x^2} \, dx,x,\sqrt {1+\tan (e+f x)}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )} f}-\frac {\operatorname {Subst}\left (\int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 x}{-\sqrt {2}+\sqrt {2 \left (1+\sqrt {2}\right )} x-x^2} \, dx,x,\sqrt {1+\tan (e+f x)}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )} f}\\ &=-\frac {\tanh ^{-1}\left (\sqrt {1+\tan (e+f x)}\right )}{f}-\frac {\log \left (1+\sqrt {2}+\tan (e+f x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+\tan (e+f x)}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )} f}+\frac {\log \left (1+\sqrt {2}+\tan (e+f x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+\tan (e+f x)}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )} f}-\frac {\cot (e+f x) \sqrt {1+\tan (e+f x)}}{f}+\frac {\operatorname {Subst}\left (\int \frac {1}{2 \left (1-\sqrt {2}\right )-x^2} \, dx,x,-\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+\tan (e+f x)}\right )}{f}+\frac {\operatorname {Subst}\left (\int \frac {1}{2 \left (1-\sqrt {2}\right )-x^2} \, dx,x,\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+\tan (e+f x)}\right )}{f}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {1+\tan (e+f x)}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )}{\sqrt {2 \left (-1+\sqrt {2}\right )} f}-\frac {\tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+\tan (e+f x)}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )}{\sqrt {2 \left (-1+\sqrt {2}\right )} f}-\frac {\tanh ^{-1}\left (\sqrt {1+\tan (e+f x)}\right )}{f}-\frac {\log \left (1+\sqrt {2}+\tan (e+f x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+\tan (e+f x)}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )} f}+\frac {\log \left (1+\sqrt {2}+\tan (e+f x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+\tan (e+f x)}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )} f}-\frac {\cot (e+f x) \sqrt {1+\tan (e+f x)}}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.26, size = 102, normalized size = 0.35 \[ -\frac {\tanh ^{-1}\left (\sqrt {\tan (e+f x)+1}\right )-i \sqrt {1-i} \tanh ^{-1}\left (\frac {\sqrt {\tan (e+f x)+1}}{\sqrt {1-i}}\right )+i \sqrt {1+i} \tanh ^{-1}\left (\frac {\sqrt {\tan (e+f x)+1}}{\sqrt {1+i}}\right )+\sqrt {\tan (e+f x)+1} \cot (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.56, size = 1000, normalized size = 3.47 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 1.30, size = 8262, normalized size = 28.69 \[ \text {output too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\tan \left (f x + e\right ) + 1} \cot \left (f x + e\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.89, size = 121, normalized size = 0.42 \[ \frac {\mathrm {atan}\left (\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{f}+\frac {\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}}{f-f\,\left (\mathrm {tan}\left (e+f\,x\right )+1\right )}+\mathrm {atan}\left (f\,\sqrt {\frac {-\frac {1}{4}-\frac {1}{4}{}\mathrm {i}}{f^2}}\,\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}\,\left (1-\mathrm {i}\right )\right )\,\sqrt {\frac {-\frac {1}{4}-\frac {1}{4}{}\mathrm {i}}{f^2}}\,2{}\mathrm {i}-\mathrm {atan}\left (f\,\sqrt {\frac {-\frac {1}{4}+\frac {1}{4}{}\mathrm {i}}{f^2}}\,\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}\,\left (1+1{}\mathrm {i}\right )\right )\,\sqrt {\frac {-\frac {1}{4}+\frac {1}{4}{}\mathrm {i}}{f^2}}\,2{}\mathrm {i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\tan {\left (e + f x \right )} + 1} \cot ^{2}{\left (e + f x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________